package com.example.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.crm.entity.Shop;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ShopMapper extends BaseMapper<Shop> {

    @Select("select s.id,s.shop_name,s.shop_code,s.account_id,a.user_name as shop_account,a.`password` from shop s left join account a on s.account_id=a.id")
    List<Shop> selectShops();

}
